﻿using System;
using System.Collections.Generic;

namespace ASP.NetAjaxApplication.Models
{
    public  class ListRepository :IRepository<NodeModel>
    {
        private IEnumerable<NodeModel> _listCollection = DummyData.CreateList();

        public IEnumerable<NodeModel> GetClients()
        {
            return DummyData.CreateListClients();
        }

        public IEnumerable<string> GetRecentQuotes()
        {
            return DummyData.CreateListRecentQuotes();
        }

        public void Update(IEnumerable<NodeModel> values)
        {
            _listCollection = values;
        }

        #region Implementation of IRepository<NodeModel>

        public IEnumerable<NodeModel> GetAll()
        {
            return _listCollection;
        }

        public NodeModel Insert(NodeModel value)
        {
            throw new NotImplementedException();
        }

        public bool Update(NodeModel value)
        {
            throw new NotImplementedException();
        }

        public bool Delete(NodeModel value)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}